<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); ?>
﻿<style>
label{width:100px; float:left;}
br{clear:left;}
input ,select,textarea{margin:5px 0; width:400px;}
textarea{height:200px;}
h1{line-height:300%;}
.kw_submit{width:100px; border-radius:5px; background-color:#393939; color:#fff; height:40px;}
</style>
<script src="source/plugin/smartpicker/template/jquery-3.2.1.min.js" type="text/javascript"></script>
<body>
<h1>输入网站需要的关键词</h1>

<form action="plugin.php?id=smartpicker:keywordset" method="POST" id="kw_form">
<input type="hidden" name="kw_hidden">


<label>名称:</label>
<input type="text" name="kwname" placeholder="必填" /><br>

<label>英文缩写:</label>
<input type="text" name="kwshortname" placeholder="必填" /><br>

<label>关键词层级:</label>
<select name="kwlevel">
<option value="1">1</option>
<option value="2">2</option>
</select><br>

<label>父关键词；</label>
<select name="kwfather">
<option value="xxllx">新西兰留学</option>
<option value="xxllxfy">新西兰留学费用</option>
<option value="xxllxtj">新西兰留学条件</option>
<option value="xxllxys">新西兰留学优势</option>
<option value="xxllxjy">新西兰留学经验</option>
<option value="xxllxw">新西兰留学网</option>
<option value="xxldx">新西兰大学</option>
</select><br>

<label>备注;</label>
<textarea type="text" name="kwmore" placeholder="备注"></textarea><br>

<input type="submit" name="submit" placeholder="提交" class="kw_submit" id="kw_submit">
</form>

<script type="text/javascript">
$(document).ready(function(){
var checkform = document.getElementById('kw_form');
var checksubmit = document.getElementById('kw_submit');

checksubmit.onclick = function(e){
checksubmit.disabled = true;

$.ajax({
type: "POST",
url: "plugin.php?id=smartpicker:keywordset",
data:$(checkform).serialize(),
error:function(request){
alert("insert false");
checksubmit.disabled = false;
},
success:function(ok){
alert("insert success");
checksubmit.disabled = true;
}
});
}

})
</script>


</body>